<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:sut="http://www.suricattus.com.br/sut"
	xmlns:s="http://www.suricattus.com.br/jsf/ui"
	xmlns:sf="http://www.suricattus.com.br/jsf/fn">
	
	<composite:interface>	
	
		<composite:attribute name="updateId" />
		
		<composite:attribute name="mensagem" />
		
		<composite:attribute name="action" required="true" method-signature="void action()"/>
		
		<composite:attribute name="formSubmit"/>
		
		<composite:attribute name="widgetVar" required="true"/>
		
	</composite:interface>	
	
	<composite:implementation>
	
		<p:confirmDialog id="confirmDialog" message="#{cc.attrs.mensagem != null ? cc.attrs.mensagem:messages['msgP015']}" header="#{messages['msgP015']}" severity="alert" widgetVar="#{cc.attrs.widgetVar}">  
			<h:form id="confirmForm">
		
		        <p:commandLink styleClass="btn btn-primary" id="confirm" value="#{labels['botao.confirmar']}" update="#{cc.attrs.updateId}" oncomplete="#{cc.attrs.widgetVar}.hide()" actionListener="#{cc.attrs.action}" process="#{cc.attrs.formSubmit ne null?cc.attrs.formSubmit:'@this'}"/>
		        
		        <p:spacer width="20px"/>
		        
		        <p:commandButton styleClass="btn btn-primary" id="decline" value="#{labels['botao.cancelar']}"  onclick="#{cc.attrs.widgetVar}.hide()" type="button" />   
	                  
			</h:form>
    	</p:confirmDialog>  		
	
	</composite:implementation>	
	
</html>